<!DOCTYPE html>
<html>
<head>
<title>角色管理</title>
<jsp:include page="../../include/header.jsp" />
</head>
<body class="">
	<div class="admin-detail-content">
		<div class="breadcrumb">
			<a class="btn btn-success btn-small" href="base/role/role!preUpdate.action">新建角色</a>
		</div>
		<div class="searchs">
			<select id="roleTypes">
				<option value=""></option>
				<c:forEach var="roleType" items="${roleTypes}">
					<option value="${roleType.id}" <c:if test="${roleType.id eq roleTypeId}">selected</c:if> >${roleType.name}</option>
				</c:forEach>
			</select>
		</div>
		<div class="">
			<table class="table table-striped">
				<thead>
					<tr>
						<th>名称</th>
						<th>成员</th>
						<th>权限</th>
						<th>&nbsp;</th>
					</tr>
				</thead>
				<tbody>
				<c:forEach var="role" items="${roles}">
					<tr>
						<td><a href="base/role/role!preUpdate.action?id=${role.id}">${role.name}</a></td>
						<td><a href="base/role/role!listUserByRole.action?id=${role.id}">+</a></td>
						<td></td>
						<td>
							<a class="btn btn-danger btn-small delete" roleId="${role.id}" href="javascript:;">删除</a>
						</td>
					</tr>
				</c:forEach>
				</tbody>
			</table>
		</div>
	</div>
	<div id="modalConfirmDeleteRole" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
			<h3 id="myModalLabel">对话框</h3>
		</div>
		<div class="modal-body">
			<p>确定删除该角色?</p>
		</div>
		<div class="modal-footer">
			<button class="btn btn-danger btn-small" id="btnConfirmDeleteRole" roleId="">确定</button>
			<button class="btn btn-success btn-small" data-dismiss="modal" aria-hidden="true">取消</button>
		</div>
	</div>
</body>
</html>
<script>
	base.role.init();
</script>